package chixing.day19.demo;

/*
* 单例模式的线程安全版
* */
public class Bank {
    private Bank(){}

    public static enum BankEnum{
        BANK;
        private Bank  bank = null;
        private BankEnum(){
            bank = new Bank();
        }
        public Bank getInstance(){
            return bank;
        }
    }

    public static void main(String[] args) {
        System.out.println(BankEnum.BANK.getInstance());
    }
}
